package com.klikmee.sms.services.chat.model;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the AgentGroup database table.
 * 
 */
@Entity
@Table(name="agentgroup")
@NamedQueries({ @NamedQuery(name = "AgentGroup.findByAgentAndGroup", query = "SELECT ag FROM AgentGroup ag WHERE ag.agent = :agent AND ag.group = :group"),
				@NamedQuery(name = "AgentGroup.findByAgent", query = "SELECT ag FROM AgentGroup ag WHERE ag.agent = :agent")		
			 })
public class AgentGroup implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="AgentGroupID")
	private int agentGroupID;

	//bi-directional many-to-one association to Agent
    @ManyToOne
	@JoinColumn(name="AgentID")
	private Agent agent;

	//bi-directional many-to-one association to Group
    @ManyToOne
	@JoinColumn(name="GroupID")
	private Group group;

    public AgentGroup() {
    }

	public int getAgentGroupID() {
		return this.agentGroupID;
	}

	public void setAgentGroupID(int agentGroupID) {
		this.agentGroupID = agentGroupID;
	}

	public Agent getAgent() {
		return this.agent;
	}

	public void setAgent(Agent agent) {
		this.agent = agent;
	}
	
	public Group getGroup() {
		return this.group;
	}

	public void setGroup(Group group) {
		this.group = group;
	}
	
}